<template>
        <el-menu
                class="el-menu-demo"
                mode="horizontal"
                @select="selectWays"
                background-color="#545c64"
                text-color="#fff"
                active-text-color="#ffd04b">
            <el-menu-item index="1">首页</el-menu-item>
            <el-menu-item index="2">题库</el-menu-item>
            <el-menu-item index="3">团队</el-menu-item>
            <el-menu-item index="4">我的竞赛</el-menu-item>
            <el-menu-item index="5">个人中心</el-menu-item>
        </el-menu>
</template>

<script>
    export default {
        name: "Head",
        data(){
            return{
            }
        },
        methods:{
            selectWays(key){
                console.log(key)
                if(key==1){
                    this.$router.push("/")
                }else if(key==2){
                    this.$router.push("/questions")
                }else if(key==3){
                    this.$router.push("/teams")
                }else if(key==4){
                    this.$router.push("/competitions")
                } else if(key==5){
                    this.$router.push("/user")
                }
            }
        }
    }
</script>

<style>

</style>
